<template>
  <div class="shopCar">
    <div
      class="goods"
      v-for="el in $store.state.goods"
      :key="el.id"
    >
      <div class="goodsLeft">
        <van-switch
          v-model="el.select"
          ref="box"
        />
      </div>
      <div class="goodsRight">
        <van-card
          :num="el.num"
          :price="el.price+'.00'"
          :title="el.title"
          :thumb="el.imgSrc"
        >
          <template #desc>
            <van-stepper v-model="el.num" />
          </template>
        </van-card>
      </div>
    </div>
    <van-submit-bar
      :price=$store.getters.getallPrice*100
      button-text="提交订单"
    >
      <van-checkbox v-model="$store.getters.getall">全选</van-checkbox>
      <!-- <input
        ref="box1"
        type="checkbox"
        class="van-checkbox__icon"
        :checked=$store.getters.getall
        @click="clickAll($store.getters.getall)"
      > -->
    </van-submit-bar>
  </div>
</template>
<script>
export default {
  data: () => ({
  }),
  created() {
  },
  methods: {
  }
}
</script>
<style lang="less" >
.shopCar {
  font-family: "楷体";
  padding: 10px;
  .goods {
    display: flex;
    .goodsLeft {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex: 1;
    }
    .goodsRight {
      flex: 2;
    }
  }
  .van-stepper {
    margin-top: 10px;
  }
  .van-card {
    font-size: 16px;
  }
  .van-checkbox__icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
  }
}
</style>